/*
 * Copyright © 2022
 * @Author: zhangxiang
 * @Date: 2022-11-18 15:33:04
 * @LastEditors: zhangxiang
 * @LastEditTime: 2023-09-28 11:36:19
 * @Description:
 *
 */

/**
 * @description: 版本
 * @return {*}
 */
export const APP_VERSION = 'V1.0'

/**
 *
 * @description: 前端应用名称
 * @return {*}
 *
 */
export const DEFAULT_APP_TITLE = '算网一体编排调度平台'

/**
 *
 * @description: 前端应用名称中文
 * @return {*}
 *
 */
export const DEFAULT_APP_TITLE_EN = ''

/**
 *
 * @description: 公有云服务商
 * @return {*}
 *
 */
export const CLUSTER_PROVIDER = [
  {
    label: '阿里云',
    value: '阿里云',
    type: 'public'
  },
  {
    label: '华为云',
    value: '华为云',
    type: 'public'
  },
  {
    label: '腾讯云',
    value: '腾讯云',
    type: 'public'
  }
]

/**
 * @description: 私有云区域信息
 * @return {*}
 */
export const PRIVATE_PROVIDER_AREAS = [
  '华东',
  '华南',
  '华北',
  '西南'
]

/**
 *
 * @description: 私有云服务商
 * @return {*}
 *
 */
export const CLUSTER_PLATFORM = [
  {
    label: 'Openstack',
    value: 'Openstack',
    type: 'private'
  },
  {
    label: '浪潮InCloud',
    value: '浪潮InCloud',
    type: 'private'
  }
  // {
  //   label: 'ZStack Cloud',
  //   value: 'ZStack Cloud',
  //   type: 'private'
  // }
  // {
  //   label: '华为云Stack',
  //   value: 'huaweistack'
  // },
  // {
  //   label: 'VMware',
  //   value: 'vmware'
  // }
]

/**
 * @description: 所有云服务商
 * @return {*}
 */
export const CLUSTER_ALL = CLUSTER_PROVIDER.concat(CLUSTER_PLATFORM)

/**
 * @description: 是否是公有云
 * @param {*} cloudProvider
 * @return {*}
 */
export function isCloudPublic(cloudProvider) {
  const item = CLUSTER_ALL.find((item) => {
    return item.value === cloudProvider
  })
  return item ? item.type === 'public' : false
}

/**
 * @description: 镜像格式
 * @return {*}
 */
export const IMAGE_FORMAT = [
  {
    label: 'qcow2',
    value: 'qcow2'
  },
  {
    label: 'iso',
    value: 'iso'
  },
  {
    label: 'raw',
    value: 'raw'
  },
  {
    label: 'aki',
    value: 'aki'
  },
  {
    label: 'vmdk',
    value: 'vmdk'
  }
]

/**
 * @description: 镜像操作系统
 * @return {*}
 */
export const IMAGE_OS = [
  {
    label: 'Windows Server 2008',
    value: 'Windows Server 2008'
  },
  {
    label: 'centos7.6',
    value: 'centos7.6'
  },
  {
    label: 'ubuntu18.04',
    value: 'ubuntu18.04'
  }
]

/**
 * @description: 阿里云商相应镜像筛选时的操作系统
 * @return {*}
 */
export const CLOUD_ALI_IMAGE_OS = [
  {
    label: 'Aliyun',
    value: 'Aliyun'
  },
  {
    label: 'Anolis',
    value: 'Anolis'
  },
  {
    label: 'Ubuntu',
    value: 'Ubuntu'
  },
  {
    label: 'CentOS Stream',
    value: 'CentOS Stream'
  },
  {
    label: 'openSUSE',
    value: 'openSUSE'
  },
  {
    label: 'Debian',
    value: 'Debian'
  },
  {
    label: 'Rocky Linux',
    value: 'Rocky Linux'
  },
  {
    label: 'AlmaLinux',
    value: 'AlmaLinux'
  },
  {
    label: 'Windows Server 2016',
    value: 'Windows Server 2016'
  },
  {
    label: 'Windows Server 2019',
    value: 'Windows Server 2019'
  },
  {
    label: 'Windows Server 2022',
    value: 'Windows Server 2022'
  },
  {
    label: 'CentOS',
    value: 'CentOS'
  },
  {
    label: 'Windows Server 2012',
    value: 'Windows Server 2012'
  },
  {
    label: 'Fedora',
    value: 'Fedora'
  },
  {
    label: 'Freebsd',
    value: 'Freebsd'
  },
  {
    label: 'Fedora CoreOS',
    value: 'Fedora CoreOS'
  },
  {
    label: 'Windows Server 2008',
    value: 'Windows Server 2008'
  },
  {
    label: 'Gentoo',
    value: 'Gentoo'
  },
  {
    label: 'CoreOS',
    value: 'CoreOS'
  },
  {
    label: 'CENTOS6',
    value: 'CENTOS6'
  }
]

/**
 * @description: 腾讯云相应镜像筛选时的操作系统
 * @return {*}
 */
export const CLOUD_TENCENT_IMAGE_OS = [
  {
    label: 'Tencent',
    value: 'Tencent'
  },
  {
    label: 'Ubuntu',
    value: 'Ubuntu'
  },
  {
    label: 'CentOS Stream',
    value: 'CentOS Stream'
  },
  {
    label: 'openSUSE',
    value: 'openSUSE'
  },
  {
    label: 'Debian',
    value: 'Debian'
  },
  {
    label: 'Rocky Linux',
    value: 'Rocky Linux'
  },
  {
    label: 'AlmaLinux',
    value: 'AlmaLinux'
  },
  {
    label: 'Windows Server 2016',
    value: 'Windows Server 2016'
  },
  {
    label: 'Windows Server 2019',
    value: 'Windows Server 2019'
  },
  {
    label: 'Windows Server 2022',
    value: 'Windows Server 2022'
  },
  {
    label: 'CentOS',
    value: 'CentOS'
  },
  {
    label: 'Windows Server 2012',
    value: 'Windows Server 2012'
  },
  {
    label: 'Fedora',
    value: 'Fedora'
  },
  {
    label: 'Freebsd',
    value: 'Freebsd'
  },
  {
    label: 'Fedora CoreOS',
    value: 'Fedora CoreOS'
  },
  {
    label: 'Windows Server 2008',
    value: 'Windows Server 2008'
  },
  {
    label: 'Gentoo',
    value: 'Gentoo'
  },
  {
    label: 'CoreOS',
    value: 'CoreOS'
  },
  {
    label: 'CENTOS6',
    value: 'CENTOS6'
  }
]

/**
 * @description: 华为云相应镜像筛选时的操作系统
 * @return {*}
 */
export const CLOUD_HUAWEI_IMAGE_OS = [
  {
    label: 'Ubuntu',
    value: 'Ubuntu'
  },
  {
    label: 'Red Hat',
    value: 'Red Hat'
  },
  {
    label: 'SUSE',
    value: 'SUSE'
  },
  {
    label: 'CentOS',
    value: 'CentOS'
  },
  {
    label: 'Debian',
    value: 'Debian'
  },
  {
    label: 'OpenSUSE',
    value: 'OpenSUSE'
  },
  {
    label: 'Oracle Linux',
    value: 'Oracle Linux'
  },
  {
    label: 'Fedora',
    value: 'Fedora'
  },
  {
    label: 'CoreOS',
    value: 'CoreOS'
  },
  {
    label: 'EulerOS',
    value: 'EulerOS'
  },
  {
    label: 'Windows',
    value: 'Windows'
  },
  {
    label: 'Other',
    value: 'Other'
  }
]

/**
 * @description: 云商相应镜像筛选时的操作系统
 * @return {*}
 */
export const CLOUD_OPENSTACK_IMAGE_OS = [
  {
    label: 'Ubuntu',
    value: 'Ubuntu'
  },
  {
    label: 'CentOS',
    value: 'CentOS'
  },
  {
    label: 'Windows',
    value: 'Windows'
  },
  {
    label: 'Debian',
    value: 'Debian'
  }
]

/**
 * @description: 云商相应镜像筛选时的操作系统
 * @return {*}
 */
export const CLOUD_INSPUR_IMAGE_OS = [
  {
    label: 'Ubuntu',
    value: 'Ubuntu'
  },
  {
    label: 'CentOS',
    value: 'CentOS'
  }
]

/**
 * @description: CPU架构
 * @return {*}
 */
export const CPU_ARCH = [
  {
    label: 'X86',
    value: 'X86'
  }, {
    label: 'ARM',
    value: 'ARM'
  }
]

/**
 * @description: CPU架构-阿里云
 * @return {*}
 */
export const CPU_ARCH_ALIYUN = [
  {
    label: 'X86计算',
    value: 'X86计算'
  }, {
    label: 'ARM计算',
    value: 'ARM计算'
  }, {
    label: 'GPU/FPGA/ASIC',
    value: 'GPU/FPGA/ASIC'
  }
]

/**
 * @description: CPU架构-华为云
 * @return {*}
 */
export const CPU_ARCH_HUAWEI = [
  {
    label: '通用计算增强型',
    value: '通用计算增强型'
  }, {
    label: '通用计算型',
    value: '通用计算型'
  }, {
    label: 'GPU加速型',
    value: 'GPU加速型'
  }
]

/**
 * @description: VCPUS
 * @return {*}
 */
export const VCPUS = [
  {
    label: '1',
    value: '1'
  }, {
    label: '2',
    value: '2'
  }, {
    label: '4',
    value: '4'
  }, {
    label: '8',
    value: '8'
  }, {
    label: '12',
    value: '12'
  }, {
    label: '16',
    value: '16'
  }, {
    label: '24',
    value: '24'
  }, {
    label: '32',
    value: '32'
  }, {
    label: '48',
    value: '48'
  }
]

/**
 * @description: MEM_SIZE
 * @return {*}
 */
export const MEM_SIZE = [
  {
    label: '0.5',
    value: '0.5'
  },
  {
    label: '1',
    value: '1'
  }, {
    label: '2',
    value: '2'
  }, {
    label: '4',
    value: '4'
  }, {
    label: '8',
    value: '8'
  }, {
    label: '16',
    value: '16'
  }, {
    label: '24',
    value: '24'
  }, {
    label: '32',
    value: '32'
  }, {
    label: '48',
    value: '48'
  }, {
    label: '64',
    value: '64'
  }, {
    label: '96',
    value: '96'
  }, {
    label: '128',
    value: '128'
  }
]

/**
 * @description: VCPUS-华为
 * @return {*}
 */
export const VCPUS_HUAWEI = [
  {
    label: '1',
    value: '1'
  }, {
    label: '2',
    value: '2'
  }, {
    label: '4',
    value: '4'
  }, {
    label: '8',
    value: '8'
  }, {
    label: '12',
    value: '12'
  }, {
    label: '16',
    value: '16'
  }, {
    label: '20',
    value: '20'
  }, {
    label: '24',
    value: '24'
  }, {
    label: '32',
    value: '32'
  }, {
    label: '36',
    value: '36'
  }, {
    label: '44',
    value: '44'
  }, {
    label: '48',
    value: '48'
  }, {
    label: '60',
    value: '60'
  }
]

/**
 * @description: MEM_SIZE-华为
 * @return {*}
 */
export const MEM_SIZE_HUAWEI = [
  {
    label: '1',
    value: '1'
  }, {
    label: '2',
    value: '2'
  }, {
    label: '4',
    value: '4'
  }, {
    label: '8',
    value: '8'
  }, {
    label: '16',
    value: '16'
  }, {
    label: '24',
    value: '24'
  }, {
    label: '32',
    value: '32'
  }, {
    label: '48',
    value: '48'
  }, {
    label: '64',
    value: '64'
  }, {
    label: '96',
    value: '96'
  }, {
    label: '128',
    value: '128'
  }, {
    label: '256',
    value: '256'
  }
]
